package com.gmq.chapter02;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by gmq on 2017/08/24.
 *
 * @version 1.0
 * @since 2017/08/24 09:25
 */
public class TestHashMap {

    public static void main(String[] args) {

        HashMap<String, String> hashMap = new HashMap<>();//line1
        hashMap.put(null,"null");//null
        hashMap.put("one","hello1");//line2
        hashMap.put("two","hello2");//line3
        hashMap.put("three","hello3");//line4
        hashMap.put("four","hello4");//line5
        hashMap.put("five","hello5");//line6
        hashMap.put("six","hello6");//line7
        hashMap.put("seven","hello7");//line8

        System.out.println(hashMap.size());
        System.out.println(hashMap.get(null));
        System.out.println(hashMap.get("one"));
        System.out.println(hashMap.get("two"));
        System.out.println(hashMap.get("three"));
        System.out.println(hashMap.get("four"));
        System.out.println(hashMap.get("five"));
        System.out.println(hashMap.get("six"));
        System.out.println(hashMap.get("seven"));

    }
}
